/*
 *Copyright (c) 2024 Black Sesame Technologies
 *
 *Licensed under the Apache License, Version 2.0 (the "License");
 *you may not use this file except in compliance with the License.
 *You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 *Unless required by applicable law or agreed to in writing, software
 *distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *See the License for the specific language governing permissions and
 *limitations under the License.
*/

#ifndef __VCAN_H__
#define __VCAN_H__

#include "switch0_can_gateway_ipc_server.h"
#define VCAN_MAX_SUBCRIBED 16


void vcan_method_callback(uint8_t command, uint32_t param,
                          uint64_t context, const ext_info_t *info);
boolean vcan_check_subcribed(uint8_t des_id);
broadcast_reg_entry_t* vcan_get_subcribed_info(uint8_t des_id);
void vcan_send(const switch0_can_gateway_UInt8Array128_t *x2can,
				const uint64_t context, const ext_info_t *info);
int32_t vcan_read_subcribed(uint8_t pid, uint8_t fid, uint8_t sid);
int32_t vcan_read_unsubcribed(uint8_t pid, uint8_t fid, uint8_t sid);
#endif /* __VCAN_H__ */
